<template>
  <div class="MyComments">
    <div class="wrapper">
      <div class="header">
        <router-link
          tag="div"
          to="/my"
          class="header_left iconfont icon-guanbi"
        ></router-link>
        <div class="header_center">我的评价</div>
        <div class="header_right"></div>
      </div>
      <div class="bodyer">
        <lazy-component>
              <div class="myassess">
                <div class="valuator">
                  <ul >
                    <li v-for="(item,index) in Mycomments" :key="index">
                      <div class="valuator_top">
                        <!-- 头像 -->
                        <div class="portrait">
                          <img
                            :src="require('../assets/img/UK.png')"
                            alt=""
                          />
                          <div class="grade">Lv.20</div>
                        </div>
                        <!-- 用户名称 -->
                        <div class="user">
                          <strong>梁**</strong>
                        </div>
                        <div class="medal">
                          <img src="https://qiniu-cdn7.jinxidao.com/m/images/level/app/head_silver_member_icon.png" alt="" />
                        </div>

                        <div class="starlevel">
                          <ul>
                            <li v-for="(i, indexa) in item.value" :key="indexa">
                              <img
                                :src="require('../assets/img/ut.png')"
                                alt=""
                              />
                            </li>
                            <li v-for="(is, indexs) in 5 - item.value"
                              :key="indexs + 'ggg'"
                            >
                              <img
                                :src="require('../assets/img/fs.png')"
                                alt=""
                              />
                            </li>
                          </ul>
                          <span
                            ><strong>{{item.value}}.0</strong></span
                          >
                        </div>
                      </div>
                      <div class="valuator_title">
                       {{item.text}}
                      </div>
                      <div class="valuator_img">
                        <ul>
                          <li v-for="(img,index) in item.fileList"
                            :key="index"
                          >
                            <img  v-lazy=" img.content  " alt=""
                            />
                          </li>
                        </ul>
                      </div>
                      <div class="valuator_choose">
                        {{ item.bigtitle }}
                      </div>
                      <div class="buyTime">
                        <p>
                          {{item.year}}-{{item.month}}-{{item.day}} {{item.hours}}:{{item.minutes}}:{{item.seconds}}
                          <span>朋友结伴</span>
                        </p>
                        <div
                          :class="[
                            'fabulous',
                            'iconfont',
                            'icon-dianzan',
                          ]"
                        >
                            <!-- item.isHasSetGood ? 'con' : '', -->
                          <!-- @click="zan(item.commentId)" -->
                          <span>0</span>
                        </div>
                      </div>
                    </li>
                  </ul>
                  <div class="last">
                    <img :src="require('../assets/img/A8.png')" alt="" />
                    <p>已经全部加载完成</p>
                    <img :src="require('../assets/img/ae.png')" alt="" />
                  </div>
                </div>
              </div>
        </lazy-component>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            year:null,
            month:null,
            day:null,
            hours:null,
            minutes:null,
            seconds:null,
            Mycomments:[],
        }
    },
    created(){

        if (JSON.parse(localStorage.getItem("Mycomments"))) {
          this.Mycomments = JSON.parse(localStorage.getItem("Mycomments"));
        }

    }
};
</script>

<style lang="scss" scoped>
.MyComments {
  .wrapper {
    min-width: 320px;
    max-width: 750px;
    margin: 0 auto;
    .header {
      height: 50px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: #fff;
      padding: 0 16px;
      position: sticky;
      left: 0;
      top: 0;
      z-index: 5;

      .header_left {
        color: #fc9632;
        font-size: 20px;
        line-height: 50px;
      }
      .header_center {
        font-size: 18px;
      }
      .header_right {
        width: 20px;
      }
    }
    .myassess {
        .valuator {
          padding: 0 16px 50px;
          background-color: #fff;
          & > ul {
            & > li {
              border-bottom: 1px solid rgb(215, 215, 215);
              padding-bottom: 20px;
              .valuator_top {
                display: flex;
                align-items: flex-end;
                padding: 20px 0;
                // 头像
                .portrait {
                  position: relative;
                  width: 30px;
                  height: 30px;
                  img {
                    width: 30px;
                  }
                  .grade {
                    position: absolute;
                    left: -8px;
                    bottom: -5px;
                    font-size: 10px;
                    transform: scale(0.7);
                    background-color: #fe821d;
                    color: #fff;
                    padding: 1px 8px;
                    border-radius: 8px;
                  }
                }
                .user {
                  color: #5c4127;
                  padding: 0 8px 0 15px;
                }
                .medal {
                  img {
                    width: 20px;
                  }
                }
                .starlevel {
                  display: flex;
                  align-items: center;
                  ul {
                    display: flex;
                    li {
                      img {
                        width: 20px;
                      }
                    }
                  }
                  span {
                    color: #fe821d;
                    font-size: 14px;
                  }
                }
              }
              .valuator_title {
                font-size: 14px;
              }
              .valuator_img {
                overflow: hidden;
                ul {
                  display: flex;
                  flex-wrap: wrap;
                  // justify-content: center;
                  padding-top: 16px;
                  li {
                    width: 25%;
                    padding: 0 0 16px 0;
                    img {
                      width: 75px;
                      height: 75px;
                    }
                  }
                }
              }
              .valuator_choose {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 1;
                overflow: hidden;
                font-size: 12px;
                color: #b2adaa;
              }
              .buyTime {
                padding-top: 10px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                p {
                  font-size: 10px;
                  color: #b2adaa;
                  span {
                    color: #ccc;
                    padding-left: 14px;
                  }
                }
                .fabulous {
                  height: 20px;
                  line-height: 20px;
                  color: #c9c1a8;
                  border: 1px solid #c9c1a8;
                  padding: 0px 10px;
                  border-radius: 15px;
                  span {
                    padding-left: 3px;
                  }
                }
                .fabulous.con {
                  color: #fe821d;
                  border: 1px solid #fe821d;
                }
              }
              &:nth-last-child(1) {
                border-bottom: 0;
              }
            }
          }
          .last {
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            img {
              height: 5px;
            }
            p {
              color: #c9c1a8;
              font-size: 14px;
              padding: 0 10px;
            }
          }
        }
      }
  }
}
</style>